package com.bookcloud.java21.chapter12.简单泛型示例122;

public class BoxExample {
  public static void main(String[] args) {
    // box装入整型
    Box<Integer> box1 = new Box<Integer>();
    box1.setContent(121);
    System.out.println("整型数字：" + box1.getContent());
    // 向box2里面存入字符串类型
    Box<String> box2 = new Box<String>();
    box2.setContent("你好");
    System.out.println("字符串：" + box2.getContent());
  }
}
